<?php

	abstract class Devmod_addOn_abstraction {
		
		protected $cfg = null;
		
		protected $config = array();
		
		protected $view = null;
		
		protected $db = null;
		
		protected $helper = null;

		protected $args = array();
		
		protected $row_value = null;
		
		public function __construct($row_value, $cfg, $config, $view)
		{
			$this->row_value = $row_value;
			
			$this->cfg = $cfg;
			
			$this->args = $cfg['args'];
			
			$this->config = $config;  
			
			$this->view = $view;
			
			$this->view->assign('_cfg', $this->cfg);
			
			if($this->view->template_dir !== "theme/__admin/tpl/"){
				$this->view->template_dir = "share/tpl/"; // its an external theme, so set share/tpl/common folders
			} 
			
			$this->db = ydsql::getInstance();
			
			$this->helper = new Devmod_helper();
			
		}	
	}